package com.xnewtech.xplatform.swan.register.modular.modname.provider;


import cn.hutool.core.bean.BeanUtil;
import com.xnewtech.xplatform.swan.register.api.RegisterApi;

import com.xnewtech.xplatform.swan.register.api.model.req.RegisterParam;
import com.xnewtech.xplatform.swan.register.modular.modname.model.params.TestDemoParam;
import com.xnewtech.xplatform.swan.register.modular.modname.service.TestDemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * demo表服务提供者
 *
 * @author xnew
 * @Date 2020-11-26 14:28:34
 */
@RestController
public class TestDemoProvider implements RegisterApi {


    @Autowired
    private TestDemoService testDemoService;

    /**
     * 新增
     *
     * @author xnew
     * @Date 2020-11-26
     */
    @Override
    public void add(@RequestBody RegisterParam param) {
        TestDemoParam param1  =new TestDemoParam();
        BeanUtil.copyProperties(param,param1);
        testDemoService.add(param1);
    }

   

}
